Skip to main content

🧠 Custom Code

Embed custom JavaScript logic directly into your workflows to extend functionality beyond the built-in actions.


Features​

  • Name: Provide a unique identifier for your custom code block to reference it within the workflow.
  • Code Editor: A rich code editor with autocomplete, syntax highlighting, and error detection for JavaScript code.
  • Execution Context: Access workflow variables, inputs, and outputs dynamically to manipulate or transform data.
  • Reusable Logic: Encapsulate complex operations or conditions that are not supported by default actions.
  • Debugging Support: Inline error messages and suggestions to assist in writing correct code.

Use Cases​

  • Perform complex conditional checks or branching logic.
  • Transform or format data dynamically before passing it to other workflow steps.
  • Integrate third-party libraries or custom algorithms.
  • Call external services using custom HTTP requests.
  • Implement loops, calculations, or advanced data manipulations.

Best Practices​

  • Keep your code modular and well-documented within the script.
  • Handle exceptions gracefully to avoid workflow failures.
  • Validate inputs and outputs to maintain data integrity.
  • Test custom code blocks independently before integrating.
  • Avoid blocking or long-running synchronous code to keep workflows responsive.

Tip: Combine Custom Code with variables and API actions to build powerful and flexible automation pipelines tailored to your unique requirements.